<?php include 'product_detail_css_js.php';?>
<div id="container">
    <?php include 'home_header.php';?>

    <div id="main">
        <div class="pr-dt-lf-capath">

            <span class="pr-dt-lf-capath-left">
                <a class='active' href="<?php echo $root_page;?>" title='Trang chủ'>Trang chủ</a><span> &gt; </span>
                            <?php foreach ($categoryParent as $key => $value) { ?>
                                    <?php if($key > 0){?>
                                        <span> &gt; </span>
                                    <?php } ?>
                                        <a class="active" href="/danhmuc/<?php echo $value['category_id'];?>/<?php echo $value['category_name_filter'];?>.html" title="<?php echo $value['category_name'];?>"><?php echo $value['category_name'];?></a>
                                    <?php $catId = $value['category_id']; $catFilterName = $value['category_name_filter'];?>
                                <?php } ?>
                                    <span> &gt; </span>
                                    <a class="active" href="<?php echo $root_page;?>/danhmuc/<?php echo $catId;?>/<?php echo $catFilterName?>/<?php echo $aryProduct['product_maker_name_filter'];?>/" title="<?php echo $aryProduct['product_maker_name'];?>"><?php echo $aryProduct['product_maker_name'];?></a>
            </span>
        </div>
        <div id="pro-detail-left">
            <div class="pro-detail-left-body">
                <div class='pr-dt-lf-body-left'><ul><li class='prow1'><span><img src='/Images/Brand/2_logo-lg.jpg' /></span></li><li class='prow2'><span><img title="<?php echo $aryProduct['product_title']; ?>" alt="<?php echo $aryProduct['product_title']; ?>" src="<?php echo $aryProduct['product_small_image']; ?>"/></span></li><li class='prow4'><span class='prow4-left'><a onclick="showPopup('7994', 'view-360', 500, 500,0)" href='javascript:;' title='Xoay 360'></a></span><span class='prow4-right'><a></a></span></li></ul></div><div class='pr-dt-lf-body-right'><ul><li class='p-right-row1'><h1><?php echo $aryProduct['product_title']; ?></h1></li>
                        <li class="p-right-row2">
                            <ul>
                                <li class="p-right-row2-odd">Bảo hành: <span class="p-right-row2-color"><?php echo $aryProduct['product_warranty_name']; ?></span></li>
                                <li><?php echo $aryProduct['product_transportation_name']; ?></li>
                                <li class="p-right-row2-odd"><span class="p-right-row2-ratting"></span>
                                    <span>Kho hàng: <?php echo $aryProduct['product_store_name']; ?></span>
                                </li>
                                <li><span>Xuất sứ: </span><?php echo $aryProduct['product_origin_name'];?></li>
                            </ul>
                        </li>
                        <li class='p-right-row3'>
                            <span class='p-right-row3-left'>Giá bán: <?php echo number_format($aryProduct['product_price_vnd'], 0, ',', '.'); ?>&nbsp;VNĐ <i style="font-size: 12px;color: #000;">(<?php echo ($aryProduct['product_is_vat'] == 1) ? 'Đã bao gồm VAT' : 'Chưa bao gồm VAT';?>)</i></span>
                            <span class="p-right-row3-right" id="product_order_<?php echo $aryProduct['product_id'];?>">
                                <?php if(in_array($aryProduct['product_id'], $aryOrderProductId)){?>
                                    <div>
                                        Đã có trong giỏ hàng.
                                    </div>
                                    <div>
                                        <a href="/order/chi-tiet-gio-hang.html" style="color: red">Xem giỏ hàng</a>
                                    </div>
                                <?php }else{ ?>
                                    <div class="btn_sales_detail" onclick="MyController.addProductToShopCat(<?php echo $aryProduct['product_id']?>, <?php echo $aryProduct['product_category_id'];?>);">
                                    </div>
                                <?php } ?>
                                
                            </span>
                        </li>
                        
                        <li class="p-right-row5"><span class="p-right-row5-left">KHUYẾN MÃI</span>
                            <span class="p-right-row5-right">
                                <?php echo $aryProduct['product_promotional']; ?>
                            </span>
                        </li>
                        <li>
                            <?php echo $aryProduct['product_highlight']; ?>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="clear">
            </div>
            <div class="clear" style="height: 10px;"></div>
            
            <div class="clear">
            </div>
            <div id="product_spec_div" style="width: 100%;">
                <div class="clear">
                </div>
                <div id="product_detail_nav_border"><ul class='pro-detail-menu'>
                        <li id="tap_spec" class=product_menu_select><span><a style="cursor:pointer;" >Thông số kỹ thuật</a></span></li>
                    </ul>
                </div>
                <div class="clear"></div>
                <div>
                    <div id="productSpec">
                        <?php echo $aryProduct['product_content'];?>
                    </div>
                    <div id="productPress" style="display: none;">

                    </div>
                    <div id="productVideo" style="display: none;">
                        <div align="center">

                        </div>
                    </div>
                    <div id="productReview" style="display: none;">
                        <a name="review"></a>


                    </div>
                    <div id="productAccessory" style="display: none;">

                    </div>
                    <div id="productOutlet" style="display: none;">
                        <div class="div_content_float">
                            <div class="left_content_50">
                                <div class="font_d_small">
                                    Danh sách các điểm bảo hành
                                </div>

                            </div>
                            <div class="right_content_50">
                                <div class="font_d_small_r">
                                    Bạn có thể tìm nhanh điểm bảo hành gần nhất bằng các tùy chọn bên dưới
                                </div>
                                <div class="div_ddl">

                                    <div id="ctl00_cphLeft_Detail1_WarrantyCenter1_upWar">
                                        <select name="brandSelectTab" id="brandSelectTab" onchange="javascript:OnChangeBrandSelect();"
                                                class="ddl_option" style="width: 100px;">
                                            <option value="-1">Chọn Thương hiệu</option>
                                        </select>
                                        <select name="categorySelectTab" id="categorySelectTab" class="ddl_option" onchange="javascript:loadContactInfo(this.value);"
                                                style="width: 120px;">
                                        </select>
                                        <select name="provinceSelectTab" id="provinceSelectTab" onchange="javascript:OnChangePrivinceSelect();"
                                                class="ddl_option" style="width: 100px;">
                                            <option value="-1">Chọn Thành Phố/Tỉnh</option>

                                        </select>
                                        <select name="districtSelectTab" id="districtSelectTab" onchange="javascript:OnChangeDistrictSelect();"
                                                class="ddl_option" style="width: 120px;">
                                        </select>
                                    </div>
                                </div>
                                <div class="content_war" id="div_content_war">
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
            
            <?php if(isset ($aryProductSameMaker[0])){?>
              <div style="width: 775px; height: 20px; display: block;" class="clear"></div>
            <div id="pl-bestsell">
                <div class="pl-bs-title">
                    <span class="pl-bs-left"></span><span class="pl-bs-center">SẢN PHẨM CÙNG HÃNG</span>
                    <span class="pl-bs-right"></span>
                </div>
                <ul class='pr-lt-ca-ct-pl'>
                    <?php $i = 1;foreach ($aryProductSameMaker as $key => $value) {?>
                        <li class='pr-lt-it <?php echo ($i%4==0) ? 'last' : '';?>'>
                        <ul>
                            <li class='img'>
                                <a href="<?php echo $root_page?>/sanpham/<?php echo $value['product_id'];?>/<?php echo $value['product_title_filter'];?>.html">
                                    <img alt='<?php echo $value['product_title'];?>' src='<?php echo $value['product_main_image'];?>' />
                                </a><span class='icon'></span>
                            </li>
                            <li class='name'>
                                <a href="<?php echo $root_page?>/sanpham/<?php echo $value['product_id'];?>/<?php echo $value['product_title_filter'];?>.html" ><?php echo $value['product_title'];?></a>
                            </li>
                            <?php if($value['product_price_active_km'] == 1){?>
                                <li class='price-market'>
                                    <?php echo ($value['product_price_vnd_km'] != 0) ? number_format($value['product_price_vnd_km'], 0, ',', '.') . '&nbsp;VNĐ' : 'Call'; ?>
                                </li>
                            <?php } ?>

                            <li class='price'><span><?php echo ($value['product_price_vnd'] != 0) ? number_format($value['product_price_vnd'], 0, ',', '.') . '&nbsp;VNĐ' : 'Call'; ?></span></li>
                            <li class="pl-hz-compare">
                                <input class="inputCompare" type="checkbox" id="<?php echo $value['product_id'];?>" onclick="MyController.addCompareList(<?php echo $value['product_id'];?>)"><span style="cursor: pointer;" onclick="MyController.compareItem();">Chọn so sánh</span>
                            </li>
                            <?php if (in_array($value['product_id'], $aryOrderProductId)) { ?>
                                <li style="text-align: center;">
                                    <div>
                                        Đã có trong giỏ hàng
                                    </div>
                                    <div>
                                        <a href="/order/chi-tiet-gio-hang.html" title="Xem giỏ hàng" style="color: red;">Xem giỏ hàng</a>
                                    </div>
                                </li>
                            <?php }else{ ?>
                            <li style="text-align: center" id="product_order_<?php echo $value['product_id']; ?>">
                                <div class="btnorder_r" onclick="MyController.addProductToShopCat(<?php echo $value['product_id']; ?>, <?php echo $value['product_category_id']; ?>);"></div>
                            </li>
                            <?php } ?>
                        </ul>
                    </li>
                    <?php $i++;} ?>

                </ul>
                <div class='clear'></div>
            </div>
            <?php }?>
            
        </div>
        <div id="pro-detail-right">
            <?php include 'product_right_support.php';?>
            <div style="width: 220px; height: 15px; display: block;" class="clear"></div>
            <div id="pdetail-samebrand">
                <span class="pdetail-samebrand-title">SẢN PHẨM MỚI</span>
                <ul>
                    <?php foreach ($aryProductNew as $key => $value) {?>
                    <li>
                        <span class="pdetail-samebrand-img">
                            <a title="<?php echo $value['product_title'];?>" href="<?php echo $root_page?>/sanpham/<?php echo $value['product_id'];?>/<?php echo $value['product_title_filter'];?>.html">
                                <img alt="<?php echo $value['product_title'];?>" src="<?php echo $value['product_small_image'];?>">
                            </a>
                        </span>
                        <span class="pdetail-samebrand-info">
                            <a title="<?php echo $value['product_title'];?>" href="<?php echo $root_page?>/sanpham/<?php echo $value['product_id'];?>/<?php echo $value['product_title_filter'];?>.html"><?php echo $value['product_title'];?></a>
                            <span><?php echo ($value['product_price_vnd'] != 0) ? number_format($value['product_price_vnd'], 0, ',', '.') . '&nbsp;VNĐ' : 'Call'; ?></span>

                        </span>
                    </li>
                    <?php } ?>

                    </ul>
            </div>
            <div style="width: 220px; height: 15px; display: block;" class="clear"></div>
            <div id="pdetail-samebrand">
                <span class="pdetail-samebrand-title">SẢN PHẨM BÁN CHẠY</span>
                <ul>
                    <?php foreach ($aryProductSellers as $key => $value) {?>
                    <li>
                        <span class="pdetail-samebrand-img">
                            <a title="<?php echo $value['product_title'];?>" href="<?php echo $root_page?>/sanpham/<?php echo $value['product_id'];?>/<?php echo $value['product_title_filter'];?>.html">
                                <img alt="<?php echo $value['product_title'];?>" src="<?php echo $value['product_small_image'];?>">
                            </a>
                        </span>
                        <span class="pdetail-samebrand-info">
                            <a title="<?php echo $value['product_title'];?>" href="<?php echo $root_page?>/sanpham/<?php echo $value['product_id'];?>/<?php echo $value['product_title_filter'];?>.html"><?php echo $value['product_title'];?></a>
                            <span><?php echo ($value['product_price_vnd'] != 0) ? number_format($value['product_price_vnd'], 0, ',', '.') . '&nbsp;VNĐ' : 'Call'; ?></span>

                        </span>
                    </li>
                    <?php } ?>
                    
                    </ul>
            </div>
            <div style="width: 220px; height: 15px; display: block;" class="clear"></div>
            <div id="pdetail-samebrand">
                <span class="pdetail-samebrand-title">SẢN PHẨM KHUYẾN MẠI</span>
                <ul>
                    <?php foreach ($aryProductKm as $key => $value) {?>
                    <li>
                        <span class="pdetail-samebrand-img">
                            <a title="<?php echo $value['product_title'];?>" href="<?php echo $root_page?>/sanpham/<?php echo $value['product_id'];?>/<?php echo $value['product_title_filter'];?>.html">
                                <img alt="<?php echo $value['product_title'];?>" src="<?php echo $value['product_small_image'];?>">
                            </a>
                        </span>
                        <span class="pdetail-samebrand-info">
                            <a title="<?php echo $value['product_title'];?>" href="<?php echo $root_page?>/sanpham/<?php echo $value['product_id'];?>/<?php echo $value['product_title_filter'];?>.html"><?php echo $value['product_title'];?></a>
                            <span><?php echo ($value['product_price_vnd'] != 0) ? number_format($value['product_price_vnd'], 0, ',', '.') . '&nbsp;VNĐ' : 'Call'; ?></span>

                        </span>
                    </li>
                    <?php } ?>

                    </ul>
            </div>
            <div class="clear" style="width: 220px; height: 15px; display: block;"></div>
        </div>

    </div>
    <div class="clear">

    </div>

    <?php include 'home_footer.php';?>

</div>
